# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kitemviews
pkgver=5.73.0
pkgrel=0
pkgdesc="Widget addons for Qt Model/View"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://community.kde.org/Frameworks"
license="GPL-2.0-only AND LGPL-2.1-only"
depends_dev="qt5-qtbase-dev"
makedepends="extra-cmake-modules qt5-qttools-dev doxygen"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kitemviews-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="3a7163735544e0b2dd701322c1befd9f6ef25a55b6ce8b7cae082461611f4c00526231d255ed105e7e7a77cba8820b94f26684e35ec57b1e892bf2479f4f5b81  kitemviews-5.73.0.tar.xz"
